/*
 * ClientFrame.java
 *
 * Created on February 3, 2009, 4:54 PM
 */


import java.awt.*;
import javax.swing.*;


/**
 *
 * @author  brandonmckune
 */
public class ClientFrame extends javax.swing.JFrame {

	private ClientController handler = null;
	private static ClientFrame cf = null;
	
    /** Creates new form ClientFrame */
    private ClientFrame() {
        initComponents();
        handler = ClientController.getInstance(this);
        addHandlersAndListeners();
    }
    
    public static synchronized ClientFrame getInstance(){
    	if(cf == null){
    		cf = new ClientFrame();
    	}
    	
    	return cf;
    }

    private void addHandlersAndListeners(){
    	this.clientIpInputTextbox.addActionListener(handler);
    	this.clientNicknameInputTextbox.addActionListener(handler);
    	this.clientConnectServerButton.addActionListener(handler);
    	this.clientTabbedFrame.addChangeListener(handler);
    	this.clientChatTextInputArea.addActionListener(handler);
    	this.clientSubmitChatButton.addActionListener(handler);
    	this.clientYAxisScrollPanel.addActionListener(handler);
    	this.clientXAxisScrollPanel.addActionListener(handler);
    	this.clientBombTypeScrollPanel.addActionListener(handler);
    	this.clientPlayButton.addActionListener(handler);
    	this.clientPlayerTextList.addActionListener(handler);
    	this.clientExitMenuItem1.addActionListener(handler);
    	this.clientHelpMenuItem1.addActionListener(handler);
    	this.clientStartGameMenuItem1.addActionListener(handler);
    	this.clientStatsMenuItem1.addActionListener(handler);
    	//this.clientOceanMapPanel.addMouseListener(handler);
        this.clientMapTabbedPane.addChangeListener(handler);
        
    }


    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        clientTitleLabel = new javax.swing.JLabel();
        clientIpLabel = new javax.swing.JLabel();
        clientNickNameLabel = new javax.swing.JLabel();
        clientIpInputTextbox = new javax.swing.JTextField("10.0.0.1"); //16); 
        clientNicknameInputTextbox = new javax.swing.JTextField("Brandon"); // ****
        clientConnectServerButton = new javax.swing.JButton();
        clientStatusLabel = new javax.swing.JLabel();
        clientTabbedFrame = new javax.swing.JTabbedPane();
        jScrollPane1 = new javax.swing.JScrollPane();
        clientChatTextArea = new javax.swing.JTextArea();
        jScrollPane2 = new javax.swing.JScrollPane();
        clientsServerInteractionTextArea = new javax.swing.JTextArea();
        jScrollPane3 = new javax.swing.JScrollPane();
        clientGameInteractionTextArea = new javax.swing.JTextArea();
        jSeparator1 = new javax.swing.JSeparator();
        clientChatTextInputArea = new javax.swing.JTextField();
        clientSubmitChatButton = new javax.swing.JButton();
        clientOceanMapPanel = new javax.swing.JPanel();
        clientMapTabbedPane = new javax.swing.JTabbedPane();
        clientTabPlayer1 = new javax.swing.JPanel();
        clientTabPlayer2 = new javax.swing.JPanel();
        clientTabPlayer3 = new javax.swing.JPanel();
        clientTabPlayer4 = new javax.swing.JPanel();
        clientTabPlayer5 = new javax.swing.JPanel();
        clientTabPlayer6 = new javax.swing.JPanel();
        clientYAxisLabel = new javax.swing.JLabel();
        clientXAxisLabel = new javax.swing.JLabel();
        clientBombTypeLabel = new javax.swing.JLabel();
        clientYAxisScrollPanel = new javax.swing.JComboBox();
        clientXAxisScrollPanel = new javax.swing.JComboBox();
        clientBombTypeScrollPanel = new javax.swing.JComboBox();
        clientPlayButton = new javax.swing.JButton();
        clientPlayerTurnLabel = new javax.swing.JLabel();
        clientPlayerListLabel = new javax.swing.JLabel();
        clientTurnPenaltyLabel = new javax.swing.JLabel();
        clientTurnPenaltyNumLabel = new javax.swing.JLabel();
        clientPlayerTextList = new java.awt.List();
        jSeparator3 = new javax.swing.JSeparator();
        clientShipPanel = new javax.swing.JPanel();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        clientStartGameMenuItem = new javax.swing.JMenuItem();
        jSeparator2 = new javax.swing.JSeparator();
        clientStatsMenuItem = new javax.swing.JMenuItem();
        clientExitMenuItem = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        clientHelpMenuItem = new javax.swing.JMenu();
        clientGetHelpMenuItem = new javax.swing.JMenuItem();
        jMenuBar2 = new javax.swing.JMenuBar();
        jMenu3 = new javax.swing.JMenu();
        clientStartGameMenuItem1 = new javax.swing.JMenuItem();
        jSeparator4 = new javax.swing.JSeparator();
        clientStatsMenuItem1 = new javax.swing.JMenuItem();
        clientExitMenuItem1 = new javax.swing.JMenuItem();
        jMenu4 = new javax.swing.JMenu();
        clientHelpMenuItem1 = new javax.swing.JMenu();
        clientGetHelpMenuItem1 = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setResizable(false);

        clientTitleLabel.setFont(new java.awt.Font("Copperplate", 1, 18));
        clientTitleLabel.setText("Team One Distributed Project");
        clientTitleLabel.setName("clientTitleLabel"); // NOI18N

        clientIpLabel.setText("IP Address:");
        clientIpLabel.setName("clientIpLabel"); // NOI18N

        clientNickNameLabel.setText("Nickname:");
        clientNickNameLabel.setName("clientNickNameLabel"); // NOI18N

        clientIpInputTextbox.setName("clientIpInputTextbox"); // NOI18N

        clientNicknameInputTextbox.setName("clientNicknameInputTextbox"); // NOI18N

        clientConnectServerButton.setText("Connect");
        clientConnectServerButton.setName("clientConnectServerButton"); // NOI18N

        clientStatusLabel.setText("Disconnected");
        clientStatusLabel.setName("clientStatusLabel"); // NOI18N

        clientTabbedFrame.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
        clientTabbedFrame.setName("clientTabbedFrame"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        clientChatTextArea.setColumns(20);
        clientChatTextArea.setRows(5);
        clientChatTextArea.setName("clientChatTextArea"); // NOI18N
        jScrollPane1.setViewportView(clientChatTextArea);

        clientTabbedFrame.addTab("Chat", jScrollPane1);

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        clientsServerInteractionTextArea.setColumns(20);
        clientsServerInteractionTextArea.setRows(5);
        clientsServerInteractionTextArea.setName("clientsServerInteractionTextArea"); // NOI18N
        jScrollPane2.setViewportView(clientsServerInteractionTextArea);

        clientTabbedFrame.addTab("Client/Server Interaction", jScrollPane2);

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        clientGameInteractionTextArea.setColumns(20);
        clientGameInteractionTextArea.setRows(5);
        clientGameInteractionTextArea.setName("clientGameInteractionTextArea"); // NOI18N
        jScrollPane3.setViewportView(clientGameInteractionTextArea);

        clientTabbedFrame.addTab("Action", jScrollPane3);

        jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jSeparator1.setName("jSeparator1"); // NOI18N

        clientChatTextInputArea.setName("clientChatTextInputArea"); // NOI18N

        clientSubmitChatButton.setText("Send");
        clientSubmitChatButton.setName("clientSubmitChatButton"); // NOI18N

        clientOceanMapPanel.setBackground(new java.awt.Color(153, 153, 153));
        clientOceanMapPanel.setName("clientOceanMapPanel"); // NOI18N

        clientMapTabbedPane.setTabPlacement(javax.swing.JTabbedPane.BOTTOM);
        clientMapTabbedPane.setName("clientMapTabbedPane"); // NOI18N

        clientTabPlayer1.setName("clientTabPlayer1"); // NOI18N
        clientMapTabbedPane.addTab("No Player", clientTabPlayer1);

        clientTabPlayer2.setName("clientTabPlayer2"); // NOI18N
        clientMapTabbedPane.addTab("No Player", clientTabPlayer2);

        clientTabPlayer3.setName("clientTabPlayer3"); // NOI18N
        clientMapTabbedPane.addTab("No Player", clientTabPlayer3);

        clientTabPlayer4.setName("clientTabPlayer4"); // NOI18N
        clientMapTabbedPane.addTab("No Player", clientTabPlayer4);

        clientTabPlayer5.setName("clientTabPlayer5"); // NOI18N
        clientMapTabbedPane.addTab("No Player", clientTabPlayer5);

        clientTabPlayer6.setName("clientTabPlayer6"); // NOI18N
        clientMapTabbedPane.addTab("No Player", clientTabPlayer6);

        org.jdesktop.layout.GroupLayout clientOceanMapPanelLayout = new org.jdesktop.layout.GroupLayout(clientOceanMapPanel);
        clientOceanMapPanel.setLayout(clientOceanMapPanelLayout);
        clientOceanMapPanelLayout.setHorizontalGroup(
            clientOceanMapPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(clientMapTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 689, Short.MAX_VALUE)
        );
        clientOceanMapPanelLayout.setVerticalGroup(
            clientOceanMapPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, clientMapTabbedPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 502, Short.MAX_VALUE)
        );

        clientYAxisLabel.setText("Y-Axis Cord:");
        clientYAxisLabel.setName("clientYAxisLabel"); // NOI18N

        clientXAxisLabel.setText("X-Axis Cord:");
        clientXAxisLabel.setName("clientXAxisLabel"); // NOI18N

        clientBombTypeLabel.setText("Loaded:");
        clientBombTypeLabel.setName("clientBombTypeLabel"); // NOI18N

        clientYAxisScrollPanel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        clientYAxisScrollPanel.setName("clientYAxisScrollPanel"); // NOI18N

        clientXAxisScrollPanel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        clientXAxisScrollPanel.setName("clientXAxisScrollPanel"); // NOI18N

        clientBombTypeScrollPanel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        clientBombTypeScrollPanel.setName("clientBombTypeScrollPanel"); // NOI18N

        clientPlayButton.setText("Launch");
        clientPlayButton.setName("clientPlayButton"); // NOI18N

        clientPlayerTurnLabel.setText("Game Not Started");
        clientPlayerTurnLabel.setName("clientPlayerTurnLabel"); // NOI18N

        clientPlayerListLabel.setText("Players:");
        clientPlayerListLabel.setName("clientPlayerListLabel"); // NOI18N

        clientTurnPenaltyLabel.setText("Game Status:");
        clientTurnPenaltyLabel.setName("clientTurnPenaltyLabel"); // NOI18N

        clientTurnPenaltyNumLabel.setText("0");
        clientTurnPenaltyNumLabel.setName("clientTurnPenaltyNumLabel"); // NOI18N

        clientPlayerTextList.setName("clientPlayerTextList"); // NOI18N

        jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jSeparator3.setName("jSeparator3"); // NOI18N

        clientShipPanel.setBackground(new java.awt.Color(204, 204, 255));
        clientShipPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("Ship Inventory"));
        clientShipPanel.setName("clientShipPanel"); // NOI18N

        org.jdesktop.layout.GroupLayout clientShipPanelLayout = new org.jdesktop.layout.GroupLayout(clientShipPanel);
        clientShipPanel.setLayout(clientShipPanelLayout);
        clientShipPanelLayout.setHorizontalGroup(
            clientShipPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 258, Short.MAX_VALUE)
        );
        clientShipPanelLayout.setVerticalGroup(
            clientShipPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 113, Short.MAX_VALUE)
        );

        jMenuBar1.setName("jMenuBar1"); // NOI18N

        jMenu1.setText("File");
        jMenu1.setName("jMenu1"); // NOI18N

        clientStartGameMenuItem.setText("Game Start");
        clientStartGameMenuItem.setName("clientStartGameMenuItem"); // NOI18N
        jMenu1.add(clientStartGameMenuItem);

        jSeparator2.setName("jSeparator2"); // NOI18N
        jMenu1.add(jSeparator2);

        clientStatsMenuItem.setText("StatsList");
        clientStatsMenuItem.setName("clientStatsMenuItem"); // NOI18N
        jMenu1.add(clientStatsMenuItem);

        clientExitMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));
        clientExitMenuItem.setText("Exit");
        clientExitMenuItem.setName("clientExitMenuItem"); // NOI18N
        jMenu1.add(clientExitMenuItem);

        jMenuBar1.add(jMenu1);

        jMenu2.setText("Edit");
        jMenu2.setName("jMenu2"); // NOI18N
        jMenuBar1.add(jMenu2);

        clientHelpMenuItem.setText("Help");
        clientHelpMenuItem.setName("clientHelpMenuItem"); // NOI18N

        clientGetHelpMenuItem.setText("Get Help");
        clientGetHelpMenuItem.setName("clientGetHelpMenuItem"); // NOI18N
        clientHelpMenuItem.add(clientGetHelpMenuItem);

        jMenuBar1.add(clientHelpMenuItem);

        jMenuBar2.setName("jMenuBar1"); // NOI18N

        jMenu3.setText("File");
        jMenu3.setName("jMenu1"); // NOI18N

        clientStartGameMenuItem1.setText("Game Start");
        clientStartGameMenuItem1.setName("clientStartGameMenuItem"); // NOI18N
        jMenu3.add(clientStartGameMenuItem1);

        jSeparator4.setName("jSeparator2"); // NOI18N
        jMenu3.add(jSeparator4);

        clientStatsMenuItem1.setText("StatsList");
        clientStatsMenuItem1.setName("clientStatsMenuItem"); // NOI18N
        jMenu3.add(clientStatsMenuItem1);

        clientExitMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));
        clientExitMenuItem1.setText("Exit");
        clientExitMenuItem1.setName("clientExitMenuItem"); // NOI18N
        jMenu3.add(clientExitMenuItem1);

        jMenuBar2.add(jMenu3);

        jMenu4.setText("Edit");
        jMenu4.setName("jMenu2"); // NOI18N
        jMenuBar2.add(jMenu4);

        clientHelpMenuItem1.setText("Help");
        clientHelpMenuItem1.setName("clientHelpMenuItem"); // NOI18N

        clientGetHelpMenuItem1.setText("Get Help");
        clientGetHelpMenuItem1.setName("clientGetHelpMenuItem"); // NOI18N
        clientHelpMenuItem1.add(clientGetHelpMenuItem1);

        jMenuBar2.add(clientHelpMenuItem1);

        setJMenuBar(jMenuBar2);

        org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .addContainerGap()
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, clientTabbedFrame, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 324, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(21, 21, 21)
                            .add(clientConnectServerButton)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(clientStatusLabel))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(clientIpLabel)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                            .add(clientIpInputTextbox))
                        .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createSequentialGroup()
                            .add(clientNickNameLabel)
                            .add(18, 18, 18)
                            .add(clientNicknameInputTextbox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 206, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, clientTitleLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 283, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                        .add(layout.createSequentialGroup()
                            .add(clientPlayerTurnLabel)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .add(clientSubmitChatButton))
                        .add(clientChatTextInputArea, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 317, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .add(14, 14, 14)
                .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(layout.createSequentialGroup()
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(layout.createSequentialGroup()
                                .add(clientTurnPenaltyLabel)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(clientTurnPenaltyNumLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 84, Short.MAX_VALUE)
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(clientPlayButton))
                            .add(layout.createSequentialGroup()
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(clientBombTypeLabel)
                                    .add(clientXAxisLabel)
                                    .add(clientYAxisLabel))
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 96, Short.MAX_VALUE)
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                                    .add(clientBombTypeScrollPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(clientXAxisScrollPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(clientYAxisScrollPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                        .add(18, 18, 18)
                        .add(jSeparator3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(12, 12, 12)
                        .add(clientShipPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(clientPlayerListLabel)
                            .add(clientPlayerTextList, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 115, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .add(23, 23, 23))
                    .add(clientOceanMapPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(layout.createSequentialGroup()
                .add(clientTitleLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(clientIpLabel)
                    .add(clientIpInputTextbox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(clientNickNameLabel)
                    .add(clientNicknameInputTextbox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(clientConnectServerButton)
                    .add(clientStatusLabel))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(clientTabbedFrame, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 381, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(clientChatTextInputArea, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(clientSubmitChatButton)
                    .add(clientPlayerTurnLabel))
                .addContainerGap(96, Short.MAX_VALUE))
            .add(jSeparator1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 667, Short.MAX_VALUE)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()
                .add(clientOceanMapPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(8, 8, 8)
                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(layout.createSequentialGroup()
                        .add(12, 12, 12)
                        .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(layout.createSequentialGroup()
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                    .add(clientYAxisLabel)
                                    .add(clientYAxisScrollPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                    .add(clientXAxisScrollPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(clientXAxisLabel))
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                    .add(clientBombTypeScrollPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                                    .add(clientBombTypeLabel))
                                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                                .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                                    .add(clientTurnPenaltyLabel)
                                    .add(clientTurnPenaltyNumLabel)
                                    .add(clientPlayButton))
                                .add(20, 20, 20))
                            .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                                .add(org.jdesktop.layout.GroupLayout.TRAILING, clientShipPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .add(org.jdesktop.layout.GroupLayout.TRAILING, jSeparator3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 141, Short.MAX_VALUE))))
                    .add(layout.createSequentialGroup()
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(clientPlayerListLabel))
                    .add(layout.createSequentialGroup()
                        .add(26, 26, 26)
                        .add(clientPlayerTextList, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .add(2, 2, 2))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ClientFrame().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel clientBombTypeLabel;
    private javax.swing.JComboBox clientBombTypeScrollPanel;
    private javax.swing.JTextArea clientChatTextArea;
    private javax.swing.JTextField clientChatTextInputArea;
    private javax.swing.JButton clientConnectServerButton;
    private javax.swing.JMenuItem clientExitMenuItem;
    private javax.swing.JMenuItem clientExitMenuItem1;
    private javax.swing.JTextArea clientGameInteractionTextArea;
    private javax.swing.JMenuItem clientGetHelpMenuItem;
    private javax.swing.JMenuItem clientGetHelpMenuItem1;
    private javax.swing.JMenu clientHelpMenuItem;
    private javax.swing.JMenu clientHelpMenuItem1;
    private javax.swing.JTextField clientIpInputTextbox;
    private javax.swing.JLabel clientIpLabel;
    private javax.swing.JTabbedPane clientMapTabbedPane;
    private javax.swing.JLabel clientNickNameLabel;
    private javax.swing.JTextField clientNicknameInputTextbox;
    private javax.swing.JPanel clientOceanMapPanel;
    private javax.swing.JButton clientPlayButton;
    private javax.swing.JLabel clientPlayerListLabel;
    private java.awt.List clientPlayerTextList;
    private javax.swing.JLabel clientPlayerTurnLabel;
    private javax.swing.JPanel clientShipPanel;
    private javax.swing.JMenuItem clientStartGameMenuItem;
    private javax.swing.JMenuItem clientStartGameMenuItem1;
    private javax.swing.JMenuItem clientStatsMenuItem;
    private javax.swing.JMenuItem clientStatsMenuItem1;
    private javax.swing.JLabel clientStatusLabel;
    private javax.swing.JButton clientSubmitChatButton;
    private javax.swing.JPanel clientTabPlayer1;
    private javax.swing.JPanel clientTabPlayer2;
    private javax.swing.JPanel clientTabPlayer3;
    private javax.swing.JPanel clientTabPlayer4;
    private javax.swing.JPanel clientTabPlayer5;
    private javax.swing.JPanel clientTabPlayer6;
    private javax.swing.JTabbedPane clientTabbedFrame;
    private javax.swing.JLabel clientTitleLabel;
    private javax.swing.JLabel clientTurnPenaltyLabel;
    private javax.swing.JLabel clientTurnPenaltyNumLabel;
    private javax.swing.JLabel clientXAxisLabel;
    private javax.swing.JComboBox clientXAxisScrollPanel;
    private javax.swing.JLabel clientYAxisLabel;
    private javax.swing.JComboBox clientYAxisScrollPanel;
    private javax.swing.JTextArea clientsServerInteractionTextArea;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenu4;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenuBar jMenuBar2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator4;
    // End of variables declaration//GEN-END:variables

	public javax.swing.JLabel getClientBombTypeLabel() {
		return clientBombTypeLabel;
	}

	public javax.swing.JComboBox getClientBombTypeScrollPanel() {
		return clientBombTypeScrollPanel;
	}

	public javax.swing.JTextArea getClientChatTextArea() {
		return clientChatTextArea;
	}

	public javax.swing.JTextField getClientChatTextInputArea() {
		return clientChatTextInputArea;
	}

	public javax.swing.JButton getClientConnectServerButton() {
		return clientConnectServerButton;
	}

	public javax.swing.JMenuItem getClientExitMenuItem() {
		return clientExitMenuItem;
	}

	public javax.swing.JMenuItem getClientExitMenuItem1() {
		return clientExitMenuItem1;
	}

	public javax.swing.JTextArea getClientGameInteractionTextArea() {
		return clientGameInteractionTextArea;
	}

	public javax.swing.JMenuItem getClientGetHelpMenuItem() {
		return clientGetHelpMenuItem;
	}

	public javax.swing.JMenuItem getClientGetHelpMenuItem1() {
		return clientGetHelpMenuItem1;
	}

	public javax.swing.JMenu getClientHelpMenuItem() {
		return clientHelpMenuItem;
	}

	public javax.swing.JMenu getClientHelpMenuItem1() {
		return clientHelpMenuItem1;
	}

	public javax.swing.JTextField getClientIpInputTextbox() {
		return clientIpInputTextbox;
	}

	public javax.swing.JLabel getClientIpLabel() {
		return clientIpLabel;
	}

	public javax.swing.JTabbedPane getClientMapTabbedPane() {
		return clientMapTabbedPane;
	}

	public javax.swing.JLabel getClientNickNameLabel() {
		return clientNickNameLabel;
	}

	public javax.swing.JTextField getClientNicknameInputTextbox() {
		return clientNicknameInputTextbox;
	}

	public javax.swing.JPanel getClientOceanMapPanel() {
		return clientOceanMapPanel;
	}

	public javax.swing.JButton getClientPlayButton() {
		return clientPlayButton;
	}

	public javax.swing.JLabel getClientPlayerListLabel() {
		return clientPlayerListLabel;
	}

	public java.awt.List getClientPlayerTextList() {
		return clientPlayerTextList;
	}

	public javax.swing.JLabel getClientPlayerTurnLabel() {
		return clientPlayerTurnLabel;
	}

	public javax.swing.JPanel getClientShipPanel() {
		return clientShipPanel;
	}

	public javax.swing.JMenuItem getClientStartGameMenuItem() {
		return clientStartGameMenuItem;
	}

	public javax.swing.JMenuItem getClientStartGameMenuItem1() {
		return clientStartGameMenuItem1;
	}

	public javax.swing.JMenuItem getClientStatsMenuItem() {
		return clientStatsMenuItem;
	}

	public javax.swing.JMenuItem getClientStatsMenuItem1() {
		return clientStatsMenuItem1;
	}

	public javax.swing.JLabel getClientStatusLabel() {
		return clientStatusLabel;
	}

	public javax.swing.JButton getClientSubmitChatButton() {
		return clientSubmitChatButton;
	}

	//Player Tabs *************************************************
	public javax.swing.JPanel getClientTabPlayer1() {
		return clientTabPlayer1;
	}

	public javax.swing.JPanel getClientTabPlayer2() {
		return clientTabPlayer2;
	}

	public javax.swing.JPanel getClientTabPlayer3() {
		return clientTabPlayer3;
	}

	public javax.swing.JPanel getClientTabPlayer4() {
		return clientTabPlayer4;
	}

	public javax.swing.JPanel getClientTabPlayer5() {
		return clientTabPlayer5;
	}

	public javax.swing.JPanel getClientTabPlayer6() {
		return clientTabPlayer6;
	}

	public javax.swing.JTabbedPane getClientTabbedFrame() {
		return clientTabbedFrame;
	}

	public javax.swing.JLabel getClientTitleLabel() {
		return clientTitleLabel;
	}

	public javax.swing.JLabel getClientTurnPenaltyLabel() {
		return clientTurnPenaltyLabel;
	}

	public javax.swing.JLabel getClientTurnPenaltyNumLabel() {
		return clientTurnPenaltyNumLabel;
	}

	public javax.swing.JLabel getClientXAxisLabel() {
		return clientXAxisLabel;
	}

	public javax.swing.JComboBox getClientXAxisScrollPanel() {
		return clientXAxisScrollPanel;
	}

	public javax.swing.JLabel getClientYAxisLabel() {
		return clientYAxisLabel;
	}

	public javax.swing.JComboBox getClientYAxisScrollPanel() {
		return clientYAxisScrollPanel;
	}

	public javax.swing.JTextArea getClientsServerInteractionTextArea() {
		return clientsServerInteractionTextArea;
	}

}
